#include<stdio.h>
#include<string.h>
int roman(const char*s)
{   int result=0;
    int x,v,i,l,c,d,m;
    i=v=x=l=c=d=m=0;
    while (*s!='\0')
    {
        if(*s=='X')
            x++;
        if(*s=='I')
            i++;
        if(*s=='V')
        v++;
        if(*s=='L')
            l++;

        if(*s=='C')
            c++;
        if(*s=='D')
            d++;
        if(*s=='M')
            m++;
        result=1*i+5*v+10*x+50*l+100*c+500*d+1000*m;
            

    }
    
}